<script setup lang="ts">
import { onLaunch } from '@dcloudio/uni-app'
import { useAppStore } from './stores/app'
import { useUserStore } from './stores/user'
import { apiIndexVisit } from '@/api/app'
import { getClient } from '@/utils/client'
const appStore = useAppStore()
const { getUser } = useUserStore()

onLaunch(async () => {
    await appStore.getConfig()
    appStore.getLocationFunc()
    appStore.getSystemInfoFn()
    // #ifdef H5
    const { status, close, url } = appStore.getH5Config
    if (status == 0) {
        if (close == 1) return (location.href = url)
        uni.reLaunch({ url: '/pages/empty/empty' })
    }
    // #endif
    await getUser()
    await apiIndexVisit({
        terminal: getClient()
    })
})
</script>
<style>
.bg-primary{
	background-color: #663d74 !important;
}
.text-primary{
	color: #663d74 !important;
}
/* .bg-white{
	background-color: #9e8fbe !important;
} */
.backgroundlinear{
	/* background:linear-gradient(#d5c6ec, #a998c8) ; */
	background-color: #fff !important;
}
.text_color{
	background-color: #e1d7ec !important;
}
.back_color{
	background-color: rgba(244, 244, 244, 1) !important;
}
.footer{
	background:#fff !important;
}
</style>
